package de.dlrg.wms;

import java.awt.Toolkit;

import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
import org.springframework.context.support.GenericApplicationContext;

import com.intel.bluetooth.BlueCoveConfigProperties;

import de.dlrg.wms.dao.AgeClassDao;
import de.dlrg.wms.dao.DisciplineDao;
import de.dlrg.wms.dao.TrackDao;
import de.dlrg.wms.gui.MainWindow;
import de.dlrg.wms.model.AgeClass;
import de.dlrg.wms.model.Discipline;
import de.dlrg.wms.model.Track;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Toolkit.getDefaultToolkit();
		System.setProperty("bluecove.jsr82.psm_minimum_off", "true");
		System.setProperty(
				BlueCoveConfigProperties.PROPERTY_JSR_82_PSM_MINIMUM_OFF,
				"true");
		GenericApplicationContext ctx = new GenericApplicationContext();
		XmlBeanDefinitionReader xmlReader = new XmlBeanDefinitionReader(ctx);
		xmlReader.loadBeanDefinitions("applicationContext.xml");
		ctx.refresh();

		MainWindow mainWindow = (MainWindow) ctx.getBean(MainWindow.class);
		mainWindow.open();
	}
}
